package com.cn.designpatterns.ex.concrete.proxy.staticproxy;

import com.cn.designpatterns.ex.concrete.proxy.IProxyObject;
import com.cn.designpatterns.ex.concrete.proxy.ProxyObject;

/**
 * @author zhangyi
 * @date 2018/12/25 16:04
 */
public class Proxyable implements IProxyObject {

    IProxyObject iProxyObject;

    public Proxyable(IProxyObject iProxyObject) {
        this.iProxyObject = iProxyObject;
    }

    @Override
    public void proxy() {
        System.out.println("代理之前处理....");
        iProxyObject.proxy();
        System.out.println("代理之后处理....");
    }
}
